
import 'package:flutter/material.dart';

class TextDemo extends StatelessWidget {
@override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
  appBar: AppBar(
    title: Text('文本及样式'),
  ),
  body: Center(
    child: Scaffold(
    body: Column(
      children: [
        Text('text1', textAlign: TextAlign.center,),
        Text("text2"*4 ,maxLines: 1,overflow: TextOverflow.ellipsis,),
        Text("text3",textScaleFactor: 1.5,),
        Text('样式设置',style: TextStyle(color: Colors.blue,fontSize: 18.0,height: 1.2,background: Paint()..color = Colors.yellow,decoration: TextDecoration.underline,decorationStyle: TextDecorationStyle.dashed),),
        Text.rich(TextSpan(
          children: [
            TextSpan(
              text: 'Home:'
            ),
            TextSpan(
              text: 'https://flutterchina.club',
              style: TextStyle(
                color: Colors.blue
              ),
              //recognizer: _tap
            )
          ]
        )),
        DefaultTextStyle(style: TextStyle(
          color: Colors.red,
          fontSize: 20.0,
        ), child: Column(crossAxisAlignment: CrossAxisAlignment.start,children: [
          Text('Hello World'),
          Text('I am Bing'),
          Text('I am Bing',style: TextStyle(
            inherit: false,
            color: Colors.grey
          ),)
        ],))
        ],),
    
    )
  ),
    );
  }
  var listData = <String>['文本及样式','按钮','图片及ICON','单选开关和复选框','输入框即表单','进度指示器'];
  var iconsData = <Icon>[ new Icon(Icons.text_fields),new Icon(Icons.bubble_chart),new Icon(Icons.image),new Icon(Icons.radio_button_checked),new Icon(Icons.text_fields),new Icon(Icons.text_format)];
  Widget textShow(){
    return Scaffold(
     appBar: AppBar(

     ),
    );
  }
  Widget buidData(BuildContext context,String titile ,Icon iconName){
    return new ListTile(
      leading: iconName,
      title: Text(titile,
      style: TextStyle(
        fontSize: 14
      ),),
      trailing: new Icon(Icons.keyboard_arrow_right),

    );
  }

}